Skip to content

Export split partnership/S-corp income leaves in the US PUF build#22

Closed
MaxGhenis wants to merge 1 commit into
latest-pointerfrom
export-partnership-split
Closed

Export split partnership/S-corp income leaves in the US PUF build#22
MaxGhenis wants to merge 1 commit into
latest-pointerfrom
export-partnership-split

Conversation

@MaxGhenis

Copy link
Copy Markdown
Contributor

What

Propagate the partnership / S-corp income split into the US dataset build, mirroring the model change in PolicyEngine/policyengine-us#8614 (merged) and the usdata change in PolicyEngine/policyengine-us-data#1169.

In the model, partnership_s_corp_income is now a formula-owned aggregate (adds = [partnership_income, s_corp_income]), and partnership_se_income was renamed to partnership_self_employment_net_earnings. The build imputes model input variables from the PUF, so it must now produce the two leaves rather than the (now engine-computed) aggregate.

Changes (packages/populace-data/build/us/build_us_candidate.py)

  • PUF_IMPUTE_VARS: partnership_s_corp_incomepartnership_income + s_corp_income
  • v3 QBI/partnership block and V1_ZERO_DEFAULTS: partnership_se_incomepartnership_self_employment_net_earnings
  • Tail-support income proxy: switched to the two leaves (sum is unchanged)

Column names verified against #1169's exact PUF exports.

⚠️ Dependencies / verification

  • Coupled to policyengine-us-data#1169. The build shells out to --usdata-repo, whose puf.py must export the leaf columns. The default worktrees are currently at a pre-#1169 commit, so this is draft until #1169 is available to the build.
  • Not build-verified. The full build needs the restricted PUF, which I couldn't run — syntax-checked only (py_compile). Needs a build + parity / exported-nonzero gate run before merge.

Mark ready once #1169 is in the build's usdata checkout and a build passes.

Mirror policyengine-us#8614 (merged) and policyengine-us-data#1169:
partnership_s_corp_income is now a formula-owned aggregate
(adds = [partnership_income, s_corp_income]) in the model, so the build
imputes the two leaves as inputs rather than the aggregate, and
partnership_se_income is renamed to partnership_self_employment_net_earnings.

- PUF_IMPUTE_VARS: partnership_s_corp_income -> partnership_income + s_corp_income
- v3 QBI/partnership block + V1_ZERO_DEFAULTS: partnership_se_income ->
  partnership_self_employment_net_earnings
- tail-support income proxy: use the two leaves (sum unchanged)

Coupled to us-data #1169 (the --usdata-repo checkout must export the leaves).
Not build-verified (restricted PUF); py_compile only.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@MaxGhenis MaxGhenis deleted the branch latest-pointer June 14, 2026 19:50
@MaxGhenis MaxGhenis closed this Jun 14, 2026
@MaxGhenis MaxGhenis deleted the export-partnership-split branch June 14, 2026 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant